package com.aio.kgo.simple.form.common.domain.bo;

import cn.hutool.core.util.ObjectUtil;
import com.aio.kgo.simple.form.common.domain.save.ModelDefinitionDo;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author lzm
 * @desc 模型定义列表
 * @date 2024/05/23
 */
public class ModelDefinitionList extends ArrayList<ModelDefinitionDo> {
    public ModelDefinitionList(List<ModelDefinitionDo> list){
        this.addAll(list);
    }
    public List<String> getModelKeys(){
        List<String> collect = this.stream().map(ModelDefinitionDo::getModelKey).collect(Collectors.toList());
        return collect;
    }
    public List<String> getModelIds(){
        List<String> collect = this.stream().map(ModelDefinitionDo::getId).collect(Collectors.toList());
        return collect;
    }

}
